@extends("admin.base")
		@section("content")
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            前台图片管理
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#"> 图片管理</a></li>
            <li class="active"> 列表</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">
            <div class="col-md-12">
              <div class="box">
                <div class="box-header with-border">
                  <h3 class="box-title"><i class="fa fa-th"></i> 图片管理</h3>
                </div><!-- /.box-header -->
                <div class="box-body">
                <form method="post" id="mydel" action="">
                  <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>" />
                  <input type="hidden" name="_method" value="DELETE" />
       
                  <table class="table table-bordered" >
                    <tr >
                      <th style="width:60px">ID</th>
                      <th>图片显示</th>
                      <th>图片状态</th>
                      <th>相关描述</th>
                      <th style="width: 100px">操作</th>
                    </tr>

                    @foreach($data as $v)
	                    <tr>
	                      <td>{{$v->id}}</td>
	                      <td><a href='{{asset('Upload')}}/{{$v->photo}}'><img src="{{asset('Upload')}}/s_{{$v->photo}}" /></a></td>
                        <td>{{$v->status}}</td>
	                      <td>{{$v->content}}</td>
	               
	                      <td style="width:140px">
            				    <a href="{{url('admin/display')}}/{{$v->id}}" class="btn btn-xs btn-primary">编辑</a>
		                      <button  class="btn btn-xs btn-danger" onclick='doDel({{$v->id}})'>删除</button> 
	                      </td>
	                    </tr> 
                      @endforeach
                      
                  </table>
                  </form>
                   
                </div><!-- /.box-body -->
               
                <div class="box-footer">
                {!! $data->render() !!}
                </div>
              </div><!-- /.box -->
             
            </div><!-- /.col -->
          
          </div><!-- /.row -->
        </section><!-- /.content -->
        @endsection
        @section("myscript")
        	<script>
        	//删除
            function doDel(id)
            {
            if(confirm("确定删除?")){
              $("#mydel").attr("action","{{url('admin/display')}}/"+id).submit();
            }
          }
          </script>

        @endsection
